package main

import (
	"github.com/astaxie/beego"
	"teamcoop/controllers"
	"teamcoop/global"
	"teamcoop/models"
)

func init() {

	models.ModelInit("")
}

func main() {
	beego.AddFuncMap("Int64ToStr", global.Int64ToStr)
	beego.AddFuncMap("GetDynamicTypeName", global.GetDynamicTypeName)
	beego.AddFuncMap("GetDynamicContent", global.GetDynamicContent)
	beego.AddFuncMap("GetDynamicOwnerId", global.GetDynamicOwnerId)
	beego.AddFuncMap("GetDynamicOwnerName", global.GetDynamicOwnerName)
	beego.AddFuncMap("GetUserName", global.GetUserName)
	beego.AddFuncMap("GetLevelHeadLevel", global.GetLevelHeadLevel)
	beego.AddFuncMap("GetLevelHead", global.GetLevelHead)
	beego.AddFuncMap("GetUserClassName", global.GetUserClassName)
	beego.SetStaticPath("/image", "static/image")
	beego.SetStaticPath("/css", "static/css")
	beego.SetStaticPath("/js", "static/js")
	beego.SetStaticPath("/font", "static/font")
	beego.SetStaticPath("/other", "static/other")
	beego.Router("/", &controllers.IndexController{})
	beego.Router("/register", &controllers.RegisterController{})
	beego.AutoRouter(&controllers.ActionController{})
	beego.Run()
}
